<?php
$values = array(); 
foreach($prices as $i => $price)	{
	$values[] = $price['Price']['price'] / 100;
	$label = "";
	$labels[] = "'$label'";
	$tooltip = number_format($price['Price']['price'] / 100,2, ",", ".")." EUR";
	$tooltips[] = "'".$tooltip."'";
}
?>
<script type="text/javascript">
head.ready("rgraph", function() {
    var line = new RGraph.Line('product_canvas_<?php print $product['Product']['asin'];?>', [<?php print implode(',', $values); ?>]);
    line.Set('chart.tooltips', [<?php print implode(',', $tooltips); ?>]);
    line.Set('chart.tooltips.effect', 'none');
    line.Set('chart.gutter', 40);
    line.Set('chart.hmargin', 0);
    line.Set('chart.linewidth', 2);
    line.Set('chart.shadow', false);
    line.Set('chart.shadow.offsetx', 0);
	line.Set('chart.shadow.offsety', 0);
	line.Set('chart.shadow.color', 'black');
	line.Set('chart.shadow.blur', 25);
	line.Set('chart.colors', ['green']);
	line.Set('chart.colors', ['green']);
	line.Set('chart.background.grid.vlines', false);
	line.Set('chart.background.grid.hlines', false);
	
	line.Set('chart.tickmarks', 'circle');
	line.Set('chart.labels', [<?php print implode(',', $labels); ?>]);
line.Draw();
});
</script>
<canvas id="product_canvas_<?php print $product['Product']['asin'];?>" width="800" height="300">

</canvas>